package com.zjq.service;

import com.github.pagehelper.PageInfo;
import com.zjq.pojo.Author;
import com.zjq.pojo.BookKind;
import com.zjq.pojo.Books;
import com.zjq.pojo.Comments;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

public interface BookService {

    /*PageInfo<Books> queryAllBookByPage(Integer currentPage,Integer pageSize);*/

    List<Books> queryAllBook();

    Books queryBookById(int id);

    int addBook(Books book);

    int deleteBookById(int id);

    int updateBook(Books books);

    List<Books> queryBookByName(@Param("bookName") String name);

    int addBookKind(BookKind bookKind);

    List<BookKind> queryBookKind();

    int deleteBookKindById(@Param("kindId") int id);

    List<Books> queryBookByKindId(@Param("bookkindId") int bookkindId);

    List<Books> queryBookByType(@Param("type") int type);

    List<Books> queryBookByKindL(@Param("kindId") int id);

    List<Comments> queryCommentsById(@Param("pId") int pId);

    List<Author> queryAuthorByName(String name);

    int addAuthor(Author author);

}
